Skip to content

Conversation

@traeak
Copy link
Contributor

@traeak traeak commented Jul 16, 2019

Initial slice plugin used pristine url to virtually call back into the same rule. This allows using a single remap line, but it has a disadvantage of rerunning all plugin rules for each slice transaction in addition to the incoming request transaction. Also it makes log analysis more difficult, the only difference being that the callback comes in on port '0'. http and https get a bit confusing as well with using the pristine url as the loopback is connected with the https url if the incoming rule is https.

This changes the default remap behaviour of the slice plugin to use a virtual remap parent point, allowing separate remap lines.

the way to set up the slice plugin with effective url: (option --remap-host= or -r )

# Base remap rule (non GET requests pass through)
map http://ats/ http://parent/ @plugin=uri_signing.so @pparam=foo_uri.config @plugin=slice.so @pparam=--remap-host=loopback

# Virtual forward proxy slice block leg (cached)
map http://loopback/ http://parent/ @plugin=header_rewrite.so @pparam=reject_non_php0.config @plugin=cache_range_requests.so

Previous configuration is still default behavior (uri_signs for incoming AND each sliced up block):

map http://ats/ http://parent/ @plugin=uri_signing.so @pparam=foo_uri.config @plugin=slice.so @plugin=cache_range_requests.so

@bryancall bryancall added this to the 9.0.0 milestone Jul 16, 2019
@traeak traeak changed the title Modify slice plugin to use effective url by default Add effective url options to slice plugin. Jul 16, 2019
@traeak traeak force-pushed the slice_effurl branch 2 times, most recently from 51bba56 to 0dd7f30 Compare July 22, 2019 13:36
@traeak traeak force-pushed the slice_effurl branch 2 times, most recently from e040c09 to f60983d Compare July 29, 2019 13:43
@traeak traeak marked this pull request as ready for review July 29, 2019 13:44
@traeak
Copy link
Contributor Author

traeak commented Aug 1, 2019

Dealing with head requests for the effective url path...solve with virtual forward proxy rule...

@zwoop zwoop modified the milestones: 9.0.0, 10.0.0 Aug 21, 2019
@bryancall
Copy link
Contributor

[approve ci]

@traeak traeak force-pushed the slice_effurl branch 4 times, most recently from bdf32d1 to 55869b0 Compare October 31, 2019 16:26
@jrushford jrushford self-requested a review November 6, 2019 16:15
Copy link
Contributor

@jrushford jrushford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@jrushford
Copy link
Contributor

[approve ci ubuntu]

1 similar comment
@jrushford
Copy link
Contributor

[approve ci ubuntu]

@jrushford jrushford merged commit 2f24fca into apache:master Nov 6, 2019
@zwoop
Copy link
Contributor

zwoop commented Nov 14, 2019

Do you want this for 9.0.x ?

@jrushford
Copy link
Contributor

jrushford commented Nov 14, 2019 via email

@zwoop
Copy link
Contributor

zwoop commented Nov 18, 2019

Cherry-picked to v9.0.x branch.

@zwoop zwoop modified the milestones: 10.0.0, 9.0.0 Nov 18, 2019
@zwoop zwoop modified the milestones: 9.0.0, 8.1.0 Apr 6, 2020
@traeak traeak deleted the slice_effurl branch January 13, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants